// app/controller/home.js
const Service = require('egg').Service;

class UserService extends Service {
  async login({username,password}) {
    if(!(username &&password)) return '参数不完整';
    let result = await this.app.mysql.get('t_broker_user',{username,password});
    console.log(result);
    if(result){
      return result;
    } else {
      return 'NOT FOUND'
    }
  }
  async register() {
    this.ctx.body = '注册';
  }
}

module.exports = UserService;